<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title>借款记录</title>
<link href="/dist/css/all_min.css" tppabs="http://www.115yz.com/xjkc/dist/css/all_min.css" rel="stylesheet">
</head>
<body>
<!--页头 start-->
<div id="header" class="kc-fixed kc-boxBody kc-commonHeight kc-commonbg">
    <div class="kc-rel">   
        <div class="float-left kc-cannel kc-pos">
             <div class="icon-bar" onclick="backUrl()"></div>
        </div>
        <a class="float-left kc-title textCenter">借款记录</a>
         <!-- <img src="/dist/img/msg.png" class="kc-msg"> -->
    </div>
</div>
<!--页头 end-->
<!--主体 start-->
<div id="bodyer" class="kc-padbody kc-boxBody record-body">
    <!-- 进行中 -->
    <div class="title" id="change">
        <span class="hover">进行中</span>
        <span>已完成</span>
    </div>
    <!-- part2 -->
  
    <div class="show-0 shows"> <?php if(isset($data)){ ?>
        <div class="detail">
            <div class="title-order">
                <span style="color: #3E4149;font-size:13px;">订单编号：<?php echo $data[0]['OrderSn']; ?></span><span style="color: #9B9B9B;font-size:14px;"><?php echo substr($data[0]['ApplyTime'],0,10); ?></span>
            </div>
            <div class="title-col">
                <span>借款金额</span><span>借款周期</span><span>到期应还/元</span>
            </div>
            <div class="title-col title-m">
                <span><?php echo $data[0]['ApplyMoney']; ?></span><span><?php echo $data[0]['ApplyDay']; ?>天</span><span><?php echo  $data[0]['ApplyMoney']; ?></span>
            </div>
        </div>
        <!-- part3 -->
            <div>
                <img style="width: 100%;margin: 5px 0px" src="/dist/img/ddxq.png">
            </div>
        <!-- part4 -->
        <div class="detail" >
                   <div class="title-stauts"style="border-bottom: 1px solid #D8D8D8;padding:0px 0px 15px 0px" ><span>订单状态</span><span><?php  echo $s[$data[0]['LoanStatus']] ?></span></div>
                   <div class="title-stauts" id="seco"><span>应还日期</span><span><?php echo substr($data[0]['YyFkTime'],0,10); ?></span></div>
                   <div class="title-stauts"><span>逾期天数</span><span>0</span></div> 
                   <div class="title-stauts"><span>逾期金额</span><span>0</span></div> 
                   <div class="title-stauts"style="border-bottom:1px solid #D8D8D8;padding:0px 0px 20px 0px"><span>签署协议</span><span><a href="#" 
                    style="color: #DBA86D;font-size: 16px;">《借款协议》</a></span> </div> 
                    <div>
                        <div class="title-stauts" ><span>共计应还</span><span style="font-size: 16px ;font-weight: 500;"><?php echo  $data[0]['ApplyMoney']; ?></span></div>
                    </div>
                    <div>
                        <img style="width: 100%;" src="/dist/img/return-now.png">
                    </div>
        </div>
    <?php }else{?>
        <div style="margin:20% auto;">
        <img src='/uploads/wujilu.png'>
        <div>您暂无订单哦，快去申请借款吧！</div>
        </div>
         <?php }   ?>
    </div>
    
    
    <!-- ===========================已完成=============================-->
    <div class="show-1 shows" style="display: none;" > <?php if($datas){ ?>
        <?php   foreach($datas as $val){ ?>
        <div>
                <div><?php if($val['LoanStatus']=='3'){echo "还款时间：". $val['hkTime']; }else{         echo "申请时间：". $val['hkTime'];                                               } ?></div>
                <div class="title-stauts first" ><span style="font-size: 15px;color: #3E4149">订单编号：<?php echo $val['OrderSn']; ?></span><img  class="return-already" src=<?php if($val['LoanStatus']=='3'){echo "/dist/img/return_already.png";}else{ echo "/dist/img/unpass.png";} ?> ></div>
                <div  class="title-stauts sec">
                    <span>借款金额</span><span>借款周期</span><span>实际还款/元</span>
                </div>
                <div class="title-stauts sec sec-2">
                    <span><?php echo $val['ApplyMoney']; ?></span><span><?php echo $val['ApplyDay']; ?>天</span><span><?php echo  $val['ApplyMoney']; ?></span>
                </div>
                <div class="title-stauts  sec-3 lookDetail" data-id="<?php echo $val['ID']  ?>"><span>查看明细</span><img src="/dist/img/circle-next.png" class="next"></div>
        </div>
        <?php } ?>
        <?php }else{ ?>
        <div style="margin:20% auto;">
        <img src='/uploads/wujilu.png'>
        <div>您暂无已完成订单哦！</div>
        </div>
        <?php }   ?>
    </div>
    
</div>
<!--主体 end-->
<script src="/resourse/jquery/jquery-1.11.3.min.js" tppabs="http://www.115yz.com/xjkc/resourse/jquery/jquery-1.11.3.min.js"></script>
<script src="/dist/js/all_min.js" tppabs="http://www.115yz.com/xjkc/dist/js/all_min.js"></script>
<script src="/dist/js/july.js" tppabs="http://www.115yz.com/xjkc/dist/js/all_min.js"></script>
<script type="text/javascript">
    $('.lookDetail').click(function(){
      let id =  $(this).attr('data-id')
        window.location.href ='/index.php/index/applyDetail?id='+id
    }) 
    //tab切换
    $('#change span').click(function(){
        let id =$(this).index();
        $(this).addClass('hover');
        $(this).siblings('span').removeClass('hover');
        $('.show-'+id).css("display","block");
        $('.show-'+id).siblings("div.shows").css("display","none");
    })



</script>
</body>
</html>